/*
 * edffilereader.cpp
 *
 *  Created on: Aug 25, 2009
 *      Author: zaca
 */

#include <biosignal/reader.h>
#include "edfmodel.h"
#include "edfparser.h"

#include <iostream>

namespace biosignal
{
namespace edf
{

class EDFReader : public Reader
{
public:
	EDFReader()
	{
		name_ = "edf reader";
	}
	bool can_read( string file_name )
	{
		return 0 == (file_name.compare(file_name.length() - 4, 4, ".edf"));
	}

	string filterString()
	{
		return "*.edf";
	}

	const BioSignal* read( string file_name )
	{
		std::cout << "reading edf model form file" << std::endl;
		return EDFParser::parse(file_name.c_str());
	}
};

AUTO_REGISTER_READER( EDFReader );


}
}
